<!DOCTYPE html>
<html style="font-size: 23.4375px;">
<head>
    <include file="./public/header.html"/>
    <style>

    </style>
<body style="font-size: 21.7589px;">
<div id="app">
    <div id="shadow" style="display: none;"></div>
    <header class="top"><span style="display: none;">加载中...</span> <span>银行转账</span> <!---->
        <div class="iconfont back" style="display: none;"></div>
        <a href="{:U('Users/rechargeWay')}" class="iconfont back" style=""></a> </header>

   <form action="{:U('Users/alipay')}" enctype="multipart/form-data" method="post" id="form">
    <div data-v-06ff19ac="" s="[object Object]" class="">
        <div data-v-06ff19ac="" class="main">
            <table data-v-06ff19ac="">
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="" style="width: 100%;text-align: center">
                        <span style="font-size: 20px;"><strong>请转账到以下支付宝账户</strong></span>
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">收款支付宝姓名:
                       <input value="{$arr.name}" id="acco" type="text" readonly="readonly" style="border: none;margin-left: 25px;width: 100px" class="cGold">
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">收款支付宝账号:
                        <input value="{$arr.zhanghao}" id="card" type="text" readonly="readonly" style="border: none;margin-left: 25px;width: 200px" class="cGold">
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="" style="width: 100%;text-align: center;">
                        <span>扫码支付</span><br />
                        <div style="display: inline-block;">
                            <img data-v-06ff19ac="" src="{$arr.img}" style="width: 80px;height: 80px">
                        </div>
                        <div style="margin-top: 10px"></div>
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">充&nbsp;值&nbsp;金&nbsp;额：
                        <input data-v-06ff19ac="" style="border: none;margin-left: 25px;width: 180px" type="tel" tag="充值金额"  placeholder="请输入充值金额" class="va81" name="Money" id="c_money" onkeyup="value=value.replace(/[^\d.]/g,'')">
                    </td>
                </tr>
                <tr data-v-06ff19ac="">
                    <td data-v-06ff19ac="">支付宝账户：
                        <input data-v-06ff19ac="" style="border: none;margin-left: 25px;width: 220px" type="text" tag="转账户名"  placeholder="请输入付款人的支付宝账户" class="va81" name="PayUser" id="my_name">
                    </td>
                </tr>
            </table>
            <div data-v-06ff19ac="" class="loginBtn BTN">
                <input data-v-06ff19ac="" type="button" value="提交充值订单" onclick="tij()" style="border: none;background: none;width: 335px;height: 42px">
            </div>
            <div data-v-06ff19ac="" class="tips">
                1、请使用支付宝扫码支付成后再提交充值订单。<br data-v-06ff19ac="">
                2、请正确填写您的支付宝账户和充值金额。<br data-v-06ff19ac="">
                3、支付1笔提交1次，请勿重复提交订单。
            </div>
            <!--弹框 begian-->
            <div id="chongzhi" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>汇款成功后，会在一分钟内为您添加额度，请刷新您的账户余额!</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
            <!--弹框 begian-->
            <div id="weikong" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>充值金额或支付宝姓名不能为空</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
            <!--弹框 begian-->
            <div id="je_geshi" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>金额格式不正确</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->
            <!--弹框 begian-->
            <div id="je_ds" class="layermbox layermbox0 layermshow" index="10" style="display: none">
                <div class="laymshade"></div>
                <div class="layermmain">
                    <div class="section">
                        <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                            <button class="layermend"></button>
                            <div class="layermcont">
                                <p>最低10最高30000</p>
                            </div>
                            <div class="layermbtn"><span type="1">确定</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <!--弹框 end-->

        </div> <!----> <!----> <!----> <!---->
    </div>
  </form>
</div>
</body>
</html>

<script>
    $(".layermbtn").click(function(){
        $(".layermbox").hide();
        location.href=location.href;
    });

    function tij(){
        var salipay_name = $("#acco").val();
        var salipay_account = $("#card").val();

        var money = $("#c_money").val().replace(/\s/g,"");
        var my_name = $("#my_name").val();

        if(money=="" || my_name==""){
            $("#weikong").show();
            return false;
        }
        var reg = /^[0-9]+(.[0-9]+)?$/; //   ^[0-9]+(.[0-9]{2})?$  限制小数点
        if(!reg.test(money)){
            $("#je_geshi").show();
            return false;
        }
        if(parseInt(money) < 10 || parseInt(money) >30000){
            $("#je_ds").show();
            return false;
        }
        $.ajax({
            type: "POST",
            url: "{:U('Users/alipay')}",
            data: {'salipay_name': salipay_name,'salipay_account': salipay_account,'money': money,'my_name': my_name},
            success: function (dat) {
                $("#chongzhi").show();
            }
        });
    }
</script>